﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="UcEquipmentManager.ascx.cs" Inherits="TheHeGeo.UserControl.UcEquipmentManager" %>
<%@ Register TagPrefix="dx" Namespace="DevExpress.Web" Assembly="DevExpress.Web.v14.2, Version=14.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>

<style type="text/css">
    .auto-style1 { width: 124px; }
</style>
<div id ="divContent" style="width: 98%">
     
    <table id="tablecontent" style="width: 100%;">
        <tr>
            <td>
                <dx:ASPxGridView ID="grvData" runat="server" Width="100%" AutoGenerateColumns="False" OnRowUpdating="grvData_RowUpdating" OnRowValidating="grvData_RowValidating" OnStartRowEditing="grvData_StartRowEditing" OnParseValue="grvData_ParseValue" OnInitNewRow="grvData_InitNewRow" OnRowInserting="grvData_RowInserting" KeyFieldName="Id" OnCustomButtonCallback="grvData_CustomButtonCallback" OnCustomButtonInitialize="grvData_CustomButtonInitialize" OnDataBinding="grvData_DataBinding">
                    <Columns>
                        <dx:GridViewCommandColumn ShowClearFilterButton="True" ShowEditButton="True" ShowNewButtonInHeader="True" VisibleIndex="0" Width="20px">
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Justify" VerticalAlign="Middle">
                            </CellStyle>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn Caption="Tên thiết bị" FieldName="TenThietBi" Name="TenThietBi" VisibleIndex="1">
                            <EditFormSettings ColumnSpan="3" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <Settings AutoFilterCondition="Contains" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="Mã thiết bị" FieldName="MaThietBi" Name="MaThietBi" ReadOnly="True" ShowInCustomizationForm="False" VisibleIndex="2">
                            <EditFormSettings ColumnSpan="3" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <Settings AutoFilterCondition="Contains" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                         <dx:GridViewDataComboBoxColumn Caption="Dự án" FieldName="TenDuAn" Name="TenDuAn" VisibleIndex="3">
                            <EditFormSettings ColumnSpan="3" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataComboBoxColumn>  
                         <dx:GridViewDataTextColumn Caption="Mật khẩu" FieldName="Mk" Visible="False" VisibleIndex="4">
                            <EditFormSettings ColumnSpan="3" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                       

                         <dx:GridViewDataSpinEditColumn Caption="Thời gian lấy mẫu" FieldName="TgLayMau" Name="TgLayMau" VisibleIndex="5" Width="40px">
                            <PropertiesSpinEdit DisplayFormatString="g" MaxValue="10000" NumberType="Integer">
                            </PropertiesSpinEdit>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataSpinEditColumn>
                         <dx:GridViewDataComboBoxColumn Caption="Đơn vị" FieldName="TgLmDv" Name="TgLmDv" VisibleIndex="6" ReadOnly="True" Width="20px">
                            <PropertiesComboBox>
                                <Items>
                                    <dx:ListEditItem Text="Giây" Value="1" />
                                    <dx:ListEditItem Text="Phút" Value="60" />
                                    <dx:ListEditItem Text="Giờ" Value="3600" />
                                </Items>
                            </PropertiesComboBox>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataComboBoxColumn>
                         <dx:GridViewDataComboBoxColumn Caption="Phần chục giây" FieldName="TgLmPcg" Name="TgLmPcg" ReadOnly="True" VisibleIndex="7" Width="10px">
                            <PropertiesComboBox>
                                <Items>
                                    <dx:ListEditItem Text="0" Value="0" />
                                    <dx:ListEditItem Text="2" Value="2" />
                                    <dx:ListEditItem Text="3" Value="3" />
                                    <dx:ListEditItem Text="5" Value="5" />
                                </Items>
                            </PropertiesComboBox>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataComboBoxColumn>
                        <dx:GridViewDataSpinEditColumn Caption="Thời gian lưu bộ nhớ" FieldName="TgLuuTheNho" Name="TgLuuTheNho" VisibleIndex="8" Width="40px">
                            <PropertiesSpinEdit DisplayFormatString="g" MaxValue="10000" MinValue="1" NumberType="Integer">
                            </PropertiesSpinEdit>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataSpinEditColumn>
                         <dx:GridViewDataComboBoxColumn Caption="Đơn vị" FieldName="TgLtn" Name="TgLtn" VisibleIndex="9" ReadOnly="True" Width="20px">
                            <PropertiesComboBox>
                                <Items>
                                    <dx:ListEditItem Text="Giây" Value="1" />
                                    <dx:ListEditItem Text="Phút" Value="60" />
                                    <dx:ListEditItem Text="Giờ" Value="3600" />
                                </Items>
                            </PropertiesComboBox>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataComboBoxColumn>
                         <dx:GridViewDataComboBoxColumn Caption="Phần chục giây" FieldName="TgLtnPcg" Name="TgLtnPcg" ReadOnly="True" VisibleIndex="10" Width="10px">
                            <PropertiesComboBox>
                                <Items>
                                    <dx:ListEditItem Text="0" Value="0" />
                                </Items>
                            </PropertiesComboBox>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataComboBoxColumn>
                         <dx:GridViewDataSpinEditColumn Caption="Thời gian gửi data" FieldName="TgGuiData" Name="TgGuiData" VisibleIndex="11" Width="40px">
                            <PropertiesSpinEdit DisplayFormatString="g" MaxValue="99999999" NumberType="Integer">
                            </PropertiesSpinEdit>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataSpinEditColumn>
                        
                        <dx:GridViewDataSpinEditColumn Caption="Chiều dài buffer cần gửi" FieldName="BufferSize" Name="BufferSize" VisibleIndex="11" Width="40px">
                            <PropertiesSpinEdit DisplayFormatString="g" MaxValue="9999" NumberType="Integer">
                            </PropertiesSpinEdit>
                            <EditFormSettings ColumnSpan="1" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataSpinEditColumn>
                        <dx:GridViewDataMemoColumn Caption="Mô tả" FieldName="MoTa" Name="MoTa" VisibleIndex="11">
                            <EditFormSettings CaptionLocation="Near" ColumnSpan="3" RowSpan="4" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <Settings AutoFilterCondition="Contains" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataMemoColumn>
                        <dx:GridViewDataTextColumn Caption="Trạng thái" FieldName="DisplayStatus" Name="DisplayStatus" ReadOnly="True" VisibleIndex="12" Width="40px">
                            <EditFormSettings ColumnSpan="3" Visible="False" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Status" Name="Status" Visible="False" VisibleIndex="13">
                            <EditFormSettings ColumnSpan="3" />
                            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Wrap="True" />
                            <CellStyle HorizontalAlign="Left" VerticalAlign="Top">
                            </CellStyle>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Id" Name="Id" Visible="False" VisibleIndex="14">
                            <EditFormSettings ColumnSpan="3" />
                        </dx:GridViewDataTextColumn>
                      <dx:GridViewCommandColumn Name="cmdBtn" ShowInCustomizationForm="False" VisibleIndex="15" ButtonType="Image" Caption="Điều khiển" Width="80px">
                        <CustomButtons>
                            <dx:GridViewCommandColumnCustomButton ID="grvBtnStart" Text="Sử dụng" Visibility="AllDataRows" Image-Width="20" Image-Url="../Master/images/startBtn.png"
                                Image-Height="20">
                                <Image Height="20px" Width="20px" Url="../Master/images/startBtn.png"></Image>
                            </dx:GridViewCommandColumnCustomButton>
                    
                            <dx:GridViewCommandColumnCustomButton ID="grvBtnStop" Text="Ngừng sử dụng" Visibility="AllDataRows" Image-Width="20" Image-Url="../Master/images/stopBtn.png"
                                Image-Height="20">
                                <Image Height="20px" Width="20px" Url="../Master/images/stopBtn.png"></Image>
                            </dx:GridViewCommandColumnCustomButton>
                        </CustomButtons>
                        <HeaderStyle  HorizontalAlign="Center" VerticalAlign="Middle" />
                    </dx:GridViewCommandColumn> 
                    </Columns>
                    <SettingsBehavior ConfirmDelete="True" AutoFilterRowInputDelay="100" />
                    <SettingsPager PageSize="20">
                    </SettingsPager>
                    <SettingsEditing EditFormColumnCount="3">
                    </SettingsEditing>
                    <Settings ShowFilterRow="True" ShowFilterRowMenu="True" />
                    <%--<SettingsText ConfirmDelete="Bạn có muốn xóa dòng dữ liệu này ?" />--%>
                    <SettingsCommandButton>
                        <NewButton Text="Thêm">
                        </NewButton>
                        <UpdateButton Text="Cập nhật" ></UpdateButton>
                        <CancelButton Text="Hủy"></CancelButton>
                        <EditButton Text="Sửa"></EditButton>
                      <%--  <DeleteButton Text="Xóa">
                        </DeleteButton>--%>
                    </SettingsCommandButton>
                </dx:ASPxGridView>
            </td>
        </tr>
    </table>
</div>